package com.ken.elmssm.mapper;


import com.ken.elmssm.bean.Admin;
import com.ken.elmssm.bean.RoleAdmin;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.springframework.stereotype.Repository;

/**
 * @author ken
 */
@Repository
public interface RoleAdminMapper extends BaseMapper<RoleAdmin>{
    /**
     *
     * @param object
     * @return
     */
    @Insert("insert into roleadmin(roleId,adminId) values(#{roleId},#{adminId})")
    public boolean add(RoleAdmin object);

    /**
     * 删除某个用户的角色
     * @param admin
     * @return
     */
    @Delete("delete from roleadmin where adminId=#{adminId}")
    public boolean deleteByAdmin(Admin admin);
}
